import request from '/@/api/request'
/** 服务管理 */

/** 新增服务 */
export const requestAddService = (data: AddServiceTypes.IRequest) => {
  return request.post<IBaseResponse<AddServiceTypes.IResponse>>('/manage/openApiService/addService', data)
}
/** 分页查询服务列表 */
export const requestGetServiceByPage = (data: GetServiceByPageTypes.IRequest) => {
  return request.post<IPaginationResponse<GetServiceByPageTypes.IResponse[]>>('/manage/openApiService/getServiceByPage', data)
}
/** 编辑服务 */
export const requestEditService = (data: EditServiceTypes.IRequest) => {
  return request.post<IBaseResponse<EditServiceTypes.IResponse>>('/manage/openApiService/editService', data)
}
/** 上线-下线-服务 */
export const requestUpdateServiceState = (data: UpdateServiceStateTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateServiceStateTypes.IResponse>>('/manage/openApiService/updateServiceState', data)
}
/** 根据uuid查询服务详情 */
export const requestGetServiceByUuid = (data: GetServiceByUuidTypes.IRequest) => {
  return request.post<IBaseResponse<GetServiceByUuidTypes.IResponse>>('/manage/openApiService/getServiceByUuid', data)
}
